package com.xuelang.pipeline.artifact.app.nexus3v1;

import com.xuelang.pipeline.artifact.app.nexus3v1.config.Nexus3v1UiFeignConfig;
import com.xuelang.pipeline.artifact.app.nexus3v1.fallback.RepositoryFolderServiceFallbackFactory;
import com.xuelang.pipeline.artifact.app.nexus3v1.request.DeleteRepositoryFolderRequest;
import com.xuelang.pipeline.artifact.app.nexus3v1.response.DeleteRepositoryFolderResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import jakarta.validation.Valid;

/**
 * 封装NexusOSS 3.37.3-02以上安全-角色相关接口-对应Security management: roles
 *
 * @author xiwen.zxg
 * @since 2024/7/9
 */
@FeignClient(
        name = "repository-folder-service",
        url = "${feign.rpc.nexus3V1UiService}",
        configuration = Nexus3v1UiFeignConfig.class,
        fallbackFactory = RepositoryFolderServiceFallbackFactory.class)
public interface RepositoryFolderService {

    /**
     * 删除Nexus3包的文件夹-实际对应业务为删除制品文件
     *
     * @param deleteRepositoryFolderRequest
     * @return
     */

    @PostMapping(value = "", produces = "application/json;charset=utf-8")
    DeleteRepositoryFolderResponse deleteFolder(@RequestBody @Valid DeleteRepositoryFolderRequest deleteRepositoryFolderRequest);

}
